<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE6" />
    <meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes" />    
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
	<meta name="format-detection" content="telephone=yes"/>
	<meta name="msapplication-tap-highlight" content="no" />
    <title>登录</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="__STATIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__STATIC__/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__STATIC__/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/css/style.css" rel="stylesheet">
    <link href="__STATIC__/css/login.css" rel="stylesheet">
    <link href="__STATIC__/css/login_zx.css" rel="stylesheet">
    <script src="__STATIC__/js/jquery.min.js?v=2.1.4"></script>
	<script src="__STATIC__/js/bootstrap.min.js?v=3.3.6" type="text/javascript" charset="utf-8"></script>	
    <!--为ie6-8添加一个ie.css文件-->
	<!--[if lte IE 8]><link href="__STATIC__/css/ie8.css" type="text/css" rel="stylesheet" media="all"><![endif]-->
	<!--为ie6添加处理png的js文件-->
	<!--[if IE 6]>
	      <script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js?_v=<%=JS_VERSION%>"></script>
	      <script type="text/javascript">
	          //给所有需要处理的png图片加上dd-pngifx这个class，就可以处理了
	          DD_belatedPNG.fix(".dd-pngfix");
	      </script>
	<![endif]
    <!--[if lt IE 9]>-->
    <!--<meta http-equiv="refresh" content="0;ie.html" />-->
    <!--<![endif]-->
   
    <script>
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
    </script>
<style type="text/css">
	.signinpanel input
	{
		-moz-padding-start: 45px !important;
		height: 40px;
		/*padding-left: 45px;*/
		-webkit-padding-start: 45px !important;
		padding: 0;
	}
	.col-sm-12 .form-control, .col-sm-12 .single-line
	{
		height: 45px !important;
	}
	.log_ym .log_yz
	{
		-moz-padding-start: 20px !important;
		-webkit-padding-start: 20px !important;
		/*padding: 0px;*/
	}
</style>

</head>

<body class="signin">
	
	
	<!--logo-->
	<div class="log_lo">
		<img src="__STATIC__/img/logo.png" />
	</div>
	<!--logo end-->
	<!--颜色登录部分-->
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-12">
                <!-- <form  action="__URL__/user_detection" method="post"> -->
                    <input type="text" class="form-control log_bk" placeholder="账号" name="account" id="account" autocomplete="off"/>
                    <img class="log_wz" src="__STATIC__/img/log_zh.png">
                    <input type="password" class="form-control log_bk"  placeholder="密码" name="password" id="password" autocomplete="off"/>
               		<img class="log_wz" src="__STATIC__/img/log_mm.png">
                    <div class="log_ym">
                    	<input type="text" id="verifcation_p" class="form-control log_yz" placeholder="验证码"/>
                    	<p class="log_im">
                    		  <img id="captcha" src="{:captcha_src()}" alt="验证码" title="点击刷新验证码" style="cursor:pointer;width: 150px;height: 40px">
                    		 <!-- <a href="javascript:void(0)" onclick="check_verify()"><img class="veri_img" src="__STATIC__/img/verifcation.png"></a> -->
                    	</p>
                    </div>
                    <div class="verify_a">
	                    <p id="verifcation"></p>
	                    <!-- <p class="verif_d"><span data-toggle="modal" data-target="#myModal" style="cursor:pointer;">忘记密码</span></p>	 -->
                    </div>
                    <p id='login' class="btn btn-success btn-block">登录</p>
                    <!-- <input type="submit" class="btn btn-success btn-block" value="登录"> -->
                <!-- </form> -->
            </div>
        </div>
    </div>
	<!--颜色部分end-->
	<!--忘记密码-->
	<!--忘记密码 end-->
	
	<!--IE 8 判断-->
	<div class="ie8_tc">
		<p>
			您的浏览器版本太低
			请升级浏览器或使用其它浏览器
		</p>
	</div>
	<div class="ie_8"></div>
	<!--IE 8 判断end-->
	
<script src="__STATIC__/js/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
	// $(function () {
	     $("#captcha").click(function () {
	            $(this).attr("src","{:captcha_src()}?t="+new Date().getTime())
	    });

	     $("#login").click(function () {
	     	var account = $("#account").val();
	     	var password = $("#password").val();
	      	var veri = $("#verifcation_p").val();
		     $.ajax({
		     	url:"{:url('doLogin')}",
				data:{"account":account,"password":password,"code":veri},
				dataType:"json",
				type:"post",
				success:function(ret){
					if(ret.code != 1){
						alert(ret.msg);
                        $('#verifcation_p').val("");
	   					$('#captcha').trigger("click");//自动触发点击事件
					}else{
					    if(ret.code == 1){
                            $(location).attr('href',ret.url);
                        if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
                            window.location.href="{:url('Mobilephone/index')}";
                        }
                        else {
                            window.location.href="{:url('Left/left')}";
                        }
                        }else{
                            alert(ret.msg);
                        }
					}
            
				}
			})
	     });

		$(document).keypress(function(e) {  
	    // 回车键事件  
	       if(e.which == 13) {  
				user_login();
	       }  
	    }); 
	   
	      //判断是否是IE浏览器，包括Edge浏览器  
	   function IEVersion(){  
	      var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串  
	      var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器  
		  var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器  
	      if(isIE)  
	      {  
	           var reIE = new RegExp("MSIE (\\d+\\.\\d+);");  
	           reIE.test(userAgent);  
	           var fIEVersion = parseFloat(RegExp["$1"]);  
	           if(fIEVersion == 7){ 
	           		return "IE7";
	           }
	           else if(fIEVersion == 8){ 
	           		alert(isIE);
	           		return "IE8";
	           }
	           else if(fIEVersion == 9){ 
	           		return "IE9";
	           }
	           else if(fIEVersion == 10){ 
	           		return "IE10";
	           }
	           else if(fIEVersion == 11){ 
	           		return "IE11";
	           }
	           else{ 
	           		return "0"
	           	}//IE版本过低
				      }  
				else if(isEdge){  
				    return "Edge";  
				}else{  
		            return "-1";//非IE  
		        }  
	   } 
	   
	   
	   
	</script>
	
</body>

</html>
